/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
-/* Define to 1 if you have the `cairo_surface_set_device_scale' function. */
-/* #undef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE */
-
/* define if we have colord */
/* #undef HAVE_COLORD */
m4_define([glib_required_version], [2.43.0])
m4_define([pango_required_version], [1.36.7])
m4_define([atk_required_version], [2.15.1])
-m4_define([cairo_required_version], [1.12.0])
+m4_define([cairo_required_version], [1.14.0])
m4_define([gdk_pixbuf_required_version], [2.30.0])
m4_define([introspection_required_version], [1.39.0])
m4_define([wayland_required_version], [1.5.91])
LIBS="$gtk_save_LIBS"
fi
-# Check for cairo_set_device_scale, as we don't want to depend hard on
-# this until there is a stable release with it
-CAIRO_CFLAGS=`$PKG_CONFIG --cflags cairo`
-CAIRO_LIBS=`$PKG_CONFIG --libs cairo`
-CFLAGS="$CFLAGS $CAIRO_CFLAGS"
-gtk_save_LIBS="$LIBS"
-LIBS="$CAIRO_LIBS $LIBS"
-AC_CHECK_FUNCS(cairo_surface_set_device_scale)
-LIBS="$gtk_save_LIBS"
-
-
CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
h = cairo_image_surface_get_height (surface);
x_scale = y_scale = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (surface, &x_scale, &y_scale);
-#endif
pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, w, h);
cairo_surface_destroy (surface);
(alpha_size == 0) ? CAIRO_FORMAT_RGB24 : CAIRO_FORMAT_ARGB32,
width, height);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (image, buffer_scale, buffer_scale);
-#endif
framebuffer = paint_data->tmp_framebuffer;
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, framebuffer);
window_height = gdk_window_get_height (window);
sx = sy = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
-#endif
cairo_surface_get_device_offset (surface,
&device_x_offset, &device_y_offset);
MAX (clip_box.width, 1),
MAX (clip_box.height, 1));
sx = sy = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
-#endif
cairo_surface_set_device_offset (window->current_paint.surface, -clip_box.x*sx, -clip_box.y*sy);
gdk_cairo_surface_mark_as_direct (window->current_paint.surface, window);
window_surface = gdk_window_ref_impl_surface (window);
sx = sy = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (window_surface, &sx, &sy);
-#endif
switch (_gdk_rendering_mode)
{
{
cairo_rectangle_t rect = { 0, 0, width * sx, height *sy };
surface = cairo_recording_surface_create (content, &rect);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (surface, sx, sy);
-#endif
}
break;
case GDK_RENDERING_MODE_IMAGE:
surface = cairo_image_surface_create (content == CAIRO_CONTENT_COLOR ? CAIRO_FORMAT_RGB24 :
content == CAIRO_CONTENT_ALPHA ? CAIRO_FORMAT_A8 : CAIRO_FORMAT_ARGB32,
width * sx, height * sy);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (surface, sx, sy);
-#endif
break;
case GDK_RENDERING_MODE_SIMILAR:
default:
cairo_surface_destroy (window_surface);
}
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
if (scale == 0)
scale = gdk_window_get_scale_factor (window);
cairo_surface_set_device_scale (surface, scale, scale);
-#endif
return surface;
}
if (surface)
{
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
- {
- double sx, sy;
- cairo_surface_get_device_scale (surface, &sx, &sy);
- cursor->surface.scale = (int)sx;
- }
-#endif
+ double sx, sy;
+ cairo_surface_get_device_scale (surface, &sx, &sy);
+ cursor->surface.scale = (int)sx;
cursor->surface.width = cairo_image_surface_get_width (surface);
cursor->surface.height = cairo_image_surface_get_height (surface);
}
cairo_surface_set_user_data (surface, &gdk_wayland_cairo_key,
data, gdk_wayland_cairo_surface_destroy);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (surface, scale, scale);
-#endif
status = cairo_surface_status (surface);
if (status != CAIRO_STATUS_SUCCESS)
impl->scale,
impl->scale);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (impl->cairo_surface, impl->scale, impl->scale);
-#endif
window->window_type = GDK_WINDOW_ROOT;
window->depth = 32;
scale = MAX (scale, output_scale);
}
-#ifndef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
- /* Don't announce a scale if we can't support it */
- scale = 1;
-#endif
-
if (scale != impl->scale)
{
impl->scale = scale;
x_scale = y_scale = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (surface, &x_scale, &y_scale);
-#endif
/* Assume any set scaling is icon scale */
*width =
height,
width * 4);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (surface, scale, scale);
-#endif
cr = cairo_create (surface);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
scale = MAX (scale, 1);
-#ifndef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
- /* Without cairo support we can't support any scale but 1 */
- scale = 1;
-#endif
-
x11_screen = GDK_X11_SCREEN (GDK_X11_DISPLAY (display)->screen);
if (!x11_screen->fixed_window_scale)
window_height = gdk_window_get_height (window);
sx = sy = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
-#endif
cairo_surface_get_device_offset (surface,
&device_x_offset, &device_y_offset);
/* we want this to be always non-null */
x11_screen->window_manager_name = g_strdup ("unknown");
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
scale_str = g_getenv ("GDK_SCALE");
-#else
- scale_str = "1";
-#endif
if (scale_str)
{
x11_screen->fixed_window_scale = TRUE;
impl->cairo_surface = gdk_x11_create_cairo_surface (impl,
gdk_window_get_width (window) * impl->window_scale,
gdk_window_get_height (window) * impl->window_scale);
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (impl->cairo_surface, impl->window_scale, impl->window_scale);
-#endif
if (WINDOW_IS_TOPLEVEL (window) && impl->toplevel->in_frame)
hook_surface_changed (window);
cairo_surface_get_device_offset (surface, &x, &y);
sx = sy = 1.;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (surface, &sx, &sy);
-#endif
/* XXX: This still bombs for non-pixmaps, but there's no way to
* detect we're not a pixmap in Cairo... */
if (x == 0.0 && y == 0.0 &&
pango_layout_get_pixel_extents (layout, &ink_rect, NULL);
clip_radius = _gtk_cairo_blur_compute_pixels (radius);
x_scale = y_scale = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
- cairo_surface_get_device_scale (cairo_get_target (existing_cr), &x_scale, &y_scale);
-#endif
+ cairo_surface_get_device_scale (cairo_get_target (existing_cr), &x_scale, &y_scale);
surface = cairo_surface_create_similar_image (cairo_get_target (existing_cr),
CAIRO_FORMAT_A8,
x_scale = y_scale = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (surface, &x_scale, &y_scale);
-#endif
/* Assume any set scaling is icon scale */
*width =
{
x_scale = y_scale = 1;
-#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (surface, &x_scale, &y_scale);
-#endif
/* Assume any set scaling is icon scale */
*width =
G_BINDING_BIDIRECTIONAL|G_BINDING_SYNC_CREATE);
}
-#if defined (GDK_WINDOWING_X11) && defined (HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE)
+#if defined (GDK_WINDOWING_X11)
static void
scale_changed (GtkAdjustment *adjustment, GtkInspectorVisual *vis)
{
static void
init_scale (GtkInspectorVisual *vis)
{
-#if defined (GDK_WINDOWING_X11) && defined (HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE)
+#if defined (GDK_WINDOWING_X11)
GdkScreen *screen;
screen = gdk_screen_get_default ();